package com.swak.ARQ;

import com.swak.reactivex.transport.Message;

/**
 * Networker.
 * 
 * @author DELL
 */
public class Networker {

	RecvListener listener;

	public Networker(RecvListener listener) {
		this.listener = listener;
	}

	public void write(Message message) {

		// 这里直接交给后续处理
		this.read(message);
	}

	public void read(Message message) {
		this.listener.recv(message.getData());
	}

	public static interface RecvListener {
		void recv(Object data);
	}
}